<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 自定义事件：v-on:eventname="expression" -->
        <button @click="handleClick">点击触发事件</button>
        <!-- 自定义事件如何触发： this.$emit("myevent") -->
        <button v-on:myevent="handleClick">点击自定义事件</button>
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>

        let vm=new Vue({
            el:"#app",
            methods:{
                handleClick:function(){
                    console.log(1);
                }
            }
        })







    </script>
</body>
</html>